package com.youkeyi.ddy.cloud.common.api.application.business.crm.vaccination;

import com.youkeyi.ddy.cloud.common.api.application.business.crm.vaccination.dto.BusinessVaccinationDetailsListCloudDto;
import com.youkeyi.ddy.cloud.common.api.application.business.crm.vaccination.param.BusinessVaccinationDetailsCreateCloudParam;
import com.youkeyi.ddy.cloud.common.api.application.business.crm.vaccination.param.BusinessVaccinationDetailsDeleteCloudParam;
import com.youkeyi.ddy.cloud.common.api.application.business.crm.vaccination.param.BusinessVaccinationDetailsListCloudParam;
import com.youkeyi.ddy.cloud.common.api.application.business.crm.vaccination.param.BusinessVaccinationDetailsUpdateCloudParam;
import com.youkeyi.ddy.cloud.common.response.ResponseContent;
import io.swagger.annotations.*;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.web.bind.annotation.*;

/**
 * 接种明细
 *
 * @author  liuxiawang
 * @Date 5/24/22 10:36 PM
 * @Location shenzhen.china
 */
@Api(tags = {"【BUSINESS】Vaccination Details"})
@RestController
@FeignClient(value = "YOUKEYI-DDY-CLOUD-APPLICATION-BUSINESS", fallback = BusinessVaccinationDetailsCloudServiceFallback.class)
@RequestMapping("/business/vaccination/details")
public interface BusinessVaccinationDetailsCloudService {

    // 查询配置列表
    @ApiOperation(value = "Query Vaccination Details List", authorizations = {@Authorization("com.youkeyi.ddy.cloud.common.api.application.business.crm.vaccination.BusinessVaccinationDetailsCloudService.list")})
    @ApiResponse(code = 200, message = "data Property in Response Body", response = BusinessVaccinationDetailsListCloudDto.class)
    @ApiImplicitParams({
            @ApiImplicitParam(name = "param", paramType = "query", value = "Param of Query Vaccination Details List", dataType = "BusinessVaccinationDetailsListCloudParam", dataTypeClass = BusinessVaccinationDetailsListCloudParam.class),
    })
    @GetMapping
    public abstract BusinessVaccinationDetailsListCloudDto list(BusinessVaccinationDetailsListCloudParam param);

    // 创建配置
    @ApiOperation(value = "Create Vaccination Details", authorizations = {@Authorization("com.youkeyi.ddy.cloud.common.api.application.business.crm.vaccination.BusinessVaccinationDetailsCloudService.create")})
    @ApiResponse(code = 200, message = "data Property in Response Body", response = ResponseContent.class)
    @ApiImplicitParams({
            @ApiImplicitParam(name = "param", paramType = "body", value = "Param of Create Vaccination Details", dataType = "BusinessVaccinationDetailsCreateCloudParam", dataTypeClass = BusinessVaccinationDetailsCreateCloudParam.class),
    })
    @PostMapping("/create")
    public abstract ResponseContent create(@RequestBody BusinessVaccinationDetailsCreateCloudParam param);


    // 编辑配置
    @ApiOperation(value = "Update Vaccination Details", authorizations = {@Authorization("com.youkeyi.ddy.cloud.common.api.application.business.crm.vaccination.BusinessVaccinationDetailsCloudService.update")})
    @ApiResponse(code = 200, message = "data Property in Response Body", response = ResponseContent.class)
    @ApiImplicitParams({
            @ApiImplicitParam(name = "param", paramType = "body", value = "Param of Update Vaccination Details", dataType = "BusinessVaccinationDetailsUpdateCloudParam", dataTypeClass = BusinessVaccinationDetailsUpdateCloudParam.class),
    })
    @PatchMapping("update")
    public abstract ResponseContent update(@RequestBody BusinessVaccinationDetailsUpdateCloudParam param);


    // 删除配置
    @ApiOperation(value = "Delete Vaccination Details", authorizations = {@Authorization("com.youkeyi.ddy.cloud.common.api.application.business.crm.vaccination.BusinessVaccinationDetailsCloudService.delete")})
    @ApiResponse(code = 200, message = "data Property in Response Body", response = ResponseContent.class)
    @ApiImplicitParams({
            @ApiImplicitParam(name = "param", paramType = "query", value = "Param of Delete Vaccination Details", dataType = "BusinessVaccinationDetailsDeleteCloudParam", dataTypeClass = BusinessVaccinationDetailsDeleteCloudParam.class),
    })
    @DeleteMapping("/delete")
    public abstract ResponseContent delete(BusinessVaccinationDetailsDeleteCloudParam param);

}
